package cn.com.customer.manager.adapter

import android.widget.TextView
import cn.com.customer.manager.R
import cn.com.customer.manager.bean.Goods
import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.BaseViewHolder


class GoodsAddAdapter(rid: Int) : BaseQuickAdapter<Goods, BaseViewHolder>(rid) {
    override fun convert(helper: BaseViewHolder?, item: Goods?) {
        helper?.let {
            var good_itemName = it.getView<TextView>(R.id.good_item_name_content)
            var good_itemPrice = it.getView<TextView>(R.id.good_item_unit_price_content)
            var good_itemNum = it.getView<TextView>(R.id.good_item_num_content)
            var good_itemMarker = it.getView<TextView>(R.id.good_item_maker)
            item?.let {
                good_itemName.setText(item.goodsName)
                good_itemPrice.setText(item.goodsPrice)
                good_itemNum.setText(item.goodsNum)
                good_itemMarker.setText(item.remark)
                helper.setText(R.id.good_item_consigneeAddress_content,item.consigneeAddress)
                helper.setText(R.id.good_item_consigneeMobile_content,item.consigneeMobile)
                helper.setText(R.id.good_item_consigneeName_content,item.consigneeName)
            }
        }
    }
}